using UnityEngine;
using System.Collections;

public class FeedFruitCollider : MonoBehaviour 
{
	public UISprite thisSprite;
	
	void OnTriggerEnter ( Collider hit )
	{
		if ( hit.gameObject.tag == "OldMan" )
		{
			if ( thisSprite.spriteName == QuestionList.Instance.feedFruit[ QuestionList.Instance.feedFruitAnswer ] )
			{
				OldManManager.Instance.StartMoving();
				QuestionList.Instance.GenerateRandomQuiz();
			}
			else
				QuestionList.Instance.GenerateRandomQuiz();
		}
	}
}
